<div class="container">
<div class="column span-24 first last" style='background-color: #dddddd;margin-bottom: 40px'>
<div class="column span-12 first"><h1><?php echo $bookTitle; ?></h1></div>
<div class="column span-12 last" style='text-align: right;'>
<div style='margin-right: 7px'>
<?php if ($mode=='server'): ?>
<a href='<?php echo $bookShelfURL; ?>'><?php echo colesoApplication::getMessage('bulldoc','bookshelf');?></a> : <a href='<?php echo $editTocURL; ?>'><?php echo colesoStrToLower(colesoApplication::getMessage('navigation','edit'));?> TOC</a> : <a href='<?php echo $rootPath."_index_rebuild?path=".urlencode($path); ?>'><?php echo colesoApplication::getMessage('bulldoc','build_index');?></a>
<?php endif; ?>
</div>
</div>
</div> 

<div class="column span-4 first" style='width: 140px'>
<ul class='toc'>
<li class='home'><a href="<?php echo $rootURL; ?>"><?php echo colesoApplication::getMessage('navigation','start');?></a></li>
<?php if (count($upTitle)): ?>
<?php for($upLevel=count($upTitle)-1;$upLevel>=0;$upLevel--): ?>
<li class='up'><a href="<?php echo str_repeat('../',$upLevel).$upLevelLink; ?>"><?php echo $upTitle[$upLevel]; ?></a></li>
<?php endfor; ?>
<?php endif; ?>
</ul>
<ul class='toc'>
<?php echo $menu; ?>
</ul>
</div>
<div class="column span-20 last" style='margin-left: 9px;border-left: 1px solid #eee'>
<div class="column span-9 first prepend-1">
<?php 
if ($prev) echo "<a href='".$prev['href']."'>&laquo;".$prev['title']."</a>";
else echo '&nbsp;';
?>
</div>
<div class="column span-9 last append-1" style='text-align: right'>
<?php
if ($next) echo "<a href='".$next['href']."'>".$next['title']." &raquo;</a>";
else echo '&nbsp;';
?>
</div>

<div class='prepend-2 append-1' style='margin-top: 40px;'>
<?php
if ($mode=='server' && !$editMode && $pageData['type']!='index') {
  $editLink="<span style='font-size: x-small'><a href='$editURL'>".
  colesoStrToLower(colesoApplication::getMessage('navigation','edit')).
  "</a> &raquo;</span>";
} else {
  $editLink='';
}
?>
<?php if ($path!='index.html'):?><h2><?php echo $curTitle; ?>
<?php if ($editLink) echo '<br/>'.$editLink; ?>
</h2>
<?php 
else: echo $editLink;
endif;
?>

<?php echo $content; ?>
</div>
</div>
<div class='column span-24 first last' style='margin-top: 40px'>
<hr/>
<p style='color: #ccc'>
<?php if (isset($bookData['copyright'])):?>&copy; <?php echo $bookData['copyright']; ?><br/><?php endif; ?>
<?php if (isset($bookData['site'])):?><a href='http://<?php echo $bookData['site']; ?>'><?php echo $bookData['site']; ?></a><br/><?php endif; ?>
</p>
</div>

</div>
